<template>
  <a-form-model :model="form" style="width: 100%">
    <a-row :gutter="10">
      <a-col v-for="(item,index) in formOptions" :key="index" v-bind="item.formItem.layout">
        <a-form-model-item v-bind="item.formItem">
          <component :is="item.type"
                     v-model="form[item.formItem.prop]"
                     v-bind="item">
          </component>
        </a-form-model-item>
      </a-col>
    </a-row>
  </a-form-model>
</template>
<script>
import AntFormInputSearch from '@/components/antdForm/components/InputSearch'

import Options from './formCommonOptions'
import _ from 'lodash'

export default {
  name: 'formEnhance',
  components: {
    AntFormInputSearch,
  },
  data() {
    return {
      formOptions: _.cloneDeep(Options),
      form: {},
    }
  }
}
</script>
